using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_Controls_home_lien_he : System.Web.UI.UserControl
{
    public string messtaikhoan = "",mess="";
    Common comm = new Common();
    DataTable dtt;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnOk_Click(object sender, EventArgs e)
    {
        string sql = "Insert HeThong_lien_he(ho_ten,dia_chi,email,sdt,tieu_de,noi_dung)"+
            "VALUES  ("+
            "N'"+txtHoTen.Text.Trim()+"',N'"+txtDiaChi.Text.Trim()+"',N'"+txtEmail.Text.Trim()+"'"+
            ",'"+txtDienThoai.Text.Trim()+"',N'"+txtTieuDe.Text.Trim()+"',N'"+txtNoiDung.Html+"'"+
            ")";
        comm.execNoneQuery(sql);
        btnCancel_Click(null,null);
    }
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        if (Request.Url.AbsolutePath.Contains("web"))
        {
            Response.Redirect("../../Default.aspx");
        }
        else
        {
            Response.Redirect("Default.aspx");
        }
    }
}
